home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-06 | 4.2 KB | 134 lines | [TEXT/MPS ] |
- Dear Leading Edge Developer:
-
- Thank you for spending the big bucks and upgrading to MPW 3.1. Unfortunately,
- we're too poor here in DTS-land to get MPW 3.1, which means that all of these
- nice source code samples you see don't necessarily work with it. Thanks to the
- generosity of a rich uncle whose Golden Parachute just died, we recently gained
- access to MPW 3.1 and were able to test things out. This is what we found:
-
-
- ==================================
- SC.001.Sample
- ==================================
-
- The assembly version does not compile under MPW 3.1. There is a conflict in
- Record names in the file "Sample.inc1.p" (QDGlobals is now defined in
- Quick.Equ). Renaming QDGlobals to QuickGlobals in "Sample.inc1.a" and
- "Sample.a" fixes the problem.
-
-
- ==================================
- SC.003.SillyBalls
- ==================================
-
- The C version does not compile. This is because the C compiler is now a little
- stricter than it used to be. We used to be able to pass Ptrs where WindowPtrs
- were needed. This is no longer possible. Change the following line in
- SillyBalls.c:
-
- mainPtr = NewCWindow(nil, &windRect, "\pBo3b Land", true, documentProc,
- (Ptr) -1, false, 0);
-
- To:
-
- mainPtr = NewCWindow(nil, &windRect, "\pBo3b Land", true, documentProc,
- (WindowPtr) -1, false, 0);
-
-
- ==================================
- SC.004.TubeTest
- ==================================
-
- CTubeTest.make is checked out read-only, and cannot be changed. To modify it,
- use OrphanFiles or ModifyRead only. We highly recommend that you do this, as
- the Make options are set up for MPW 2.0. To compile under MPW 3.1, comment out
- the COptions line with _ALLNU_, and uncomment out the COptions line MPW3:
-
- COptions = -r -d MPW3
- #COptions = -d __ALLNU__
-
-
- But that's not enough. There is another Ptr problem. There is a call to
- BlockMove() in TubeTest.c that needs to be modified. Change:
-
- BlockMove (&(*destCTab)->ctTable[3],
- &(*destCTab)->ctTable[2],
- (numColors) * sizeof(ColorSpec) ); /* copy all one entry down. */
-
- to coerce its parameters to Ptrs:
-
- BlockMove ((Ptr)&(*destCTab)->ctTable[3],
- (Ptr)&(*destCTab)->ctTable[2],
- (numColors) * sizeof(ColorSpec) ); /* copy all one entry down. */
-
-
- You will also have to do that WindowPtr thing again with the following line.
- Change:
-
- myWindow = GetNewCWindow(windowID, nil, (Ptr) -1);
-
- To:
-
- myWindow = GetNewCWindow(windowID, nil, (WindowPtr) -1);
-
-
- ==================================
- SC.013.OOPTESample
- ==================================
-
- The Pascal got a little tighter, and caught one of those "Passing a >4 byte
- value as a VAR parameter" bugs that got by us. The following line in
- TApplication.IApplication (in the file UApplication.inc1.p) is incorrect:
-
- NEW(fDocList);
-
- Instead, declare a temporary variable of type TDocumentList, create one of
- those with NEW, and assign it to fDocList:
-
- VAR
- ...
- aDocList: TDocumentList;
-
- BEGIN
- ...
- New(aDocList);
- fDocList := aDocList;
- ...
- END;
-
-
-
- ==================================
- SC.015.Offscreen
- ==================================
-
- In Offscreen.inc1.p, there is a CONST declaration of "chunky" that conflicts
- with a newly defined enumerated type in one of the header files. Comment
- out "chunky" in "Offscreen.inc1.p":
-
- { chunky = 0;}
-
- This, however, leads to a problem with the routine called InitGBuffer. At one
- point, "chunky" is passed in as a parameter where an INTEGER is required. Now
- that chunky is not an integer but an enumerated type, Pascal flags this as an
- error. The quick fix is to declare the parameter as an UNIV INTEGER, rather
- than as an INTEGER. Change the following declaration:
-
- PROCEDURE InitGBufferPixmap(pmap: PixMapHandle; aBounds: Rect; aPixelType, aPixelSize,
- aCmpCount, aCmpSize: INTEGER; aPMTable: CTabHandle; VAR dataSize: LONGINT);
-
- To:
-
- PROCEDURE InitGBufferPixmap(pmap: PixMapHandle; aBounds: Rect; aPixelType, aPixelSize,
- aCmpCount, aCmpSize: UNIV INTEGER; aPMTable: CTabHandle; VAR dataSize: LONGINT);
-
-
- Also, in Offscreen.p, there is a conflict in TYPE declarations. With MPW 3.0,
- we had to manually declare the following types:
-
- TYPE
- BitMapHandle = ^BitMapPtr;
- BitMapPtr = ^BitMap;
-
- These are now defined in Quickdraw.p, so you can comment these out.
-